package com.engineering.elink.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.engineering.elink.co.MessageSelectCo;
import com.engineering.elink.domain.Message;

public interface MessageMapper {
    int deleteByPrimaryKey(Integer messageId);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(Integer messageId);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKey(Message record);
    
    /**
     * 查询发送和接收的消息
     * @param userId
     * @return
     */
    List<Map<String,Object>> selectMessageList (@Param("msco") MessageSelectCo msco);

    /**
     * 分页总数
     * @param msco
     * @return
     */
    int selectMessageListCount (@Param("msco") MessageSelectCo msco);
    
    /**
     * 清空私信
     * @param userId
     */
	void clearMessage(@Param("userId")String userId);
	
}